package Odwracanie;

public class ReversibleDouble implements Reversible {

	double i=0;
	boolean rev=false;
	
	public ReversibleDouble(double i) {
		this.i=i; 
	}

	@Override
	public void reverse() {
		if (rev==true) {
			i=1/i+10;
			rev=false;
		}
		else
			{i=1/i;
			rev=true;
		}
		
		
	}

	@Override
	public String toString() {
		return String.valueOf(i);
	}
	

}
